{% extends 'base.html' %}

{% block content %}
    <div class="container">
        <div id="bar" style="width:1000px; height:600px;"></div>
    </div>
    <script>
        $(
            function () {
                var chart = echarts.init(document.getElementById('bar'), 'white', {renderer: 'canvas'});
                $.ajax({
                    type: "GET",
                    url: "/barChart",
                    dataType: 'json',
                    success: function (result) {
                        chart.setOption(result);
                    }
                });
            }
        )
    </script>
{% endblock %}